{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "07472d85-6722-4d74-a559-ca7082aaefd6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\n",
      "Collecting imgaug\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.whl (948 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m948.0/948.0 KB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hCollecting tensorboardX\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/96/47/9004f6b182920e921b6937a345019c9317fda4cbfcbeeb2af618b3b7a53e/tensorboardX-2.5.1-py2.py3-none-any.whl (125 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m125.4/125.4 KB\u001b[0m \u001b[31m1.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hCollecting tqdm\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/47/bb/849011636c4da2e44f1253cd927cfb20ada4374d8b3a4e425416e84900cc/tqdm-4.64.1-py2.py3-none-any.whl (78 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.5/78.5 KB\u001b[0m \u001b[31m663.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hCollecting imageio\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ec/5b/521fcf5836cc46672b04e1ec7a94c0869ca6cc6a6e147277f1eb8cbb6886/imageio-2.22.1-py3-none-any.whl (3.4 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m241.3 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting scikit-image>=0.14.2\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2d/ba/63ce953b7d593bd493e80be158f2d9f82936582380aee0998315510633aa/scikit_image-0.19.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (13.5 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.5/13.5 MB\u001b[0m \u001b[31m304.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:02\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: Pillow in /usr/local/lib/python3.7/dist-packages (from imgaug) (9.1.0)\n",
      "Requirement already satisfied: six in /usr/lib/python3/dist-packages (from imgaug) (1.11.0)\n",
      "Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from imgaug) (3.5.2)\n",
      "Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from imgaug) (1.7.3)\n",
      "Requirement already satisfied: Shapely in /usr/local/lib/python3.7/dist-packages (from imgaug) (1.8.2)\n",
      "Requirement already satisfied: numpy>=1.15 in /usr/local/lib/python3.7/dist-packages (from imgaug) (1.21.6)\n",
      "Requirement already satisfied: opencv-python in /usr/local/lib/python3.7/dist-packages (from imgaug) (4.5.5.64)\n",
      "Requirement already satisfied: protobuf<=3.20.1,>=3.8.0 in /usr/local/lib/python3.7/dist-packages (from tensorboardX) (3.17.3)\n",
      "Collecting tifffile>=2019.7.26\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d8/38/85ae5ed77598ca90558c17a2f79ddaba33173b31cf8d8f545d34d9134f0d/tifffile-2021.11.2-py3-none-any.whl (178 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m178.9/178.9 KB\u001b[0m \u001b[31m284.5 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from scikit-image>=0.14.2->imgaug) (21.3)\n",
      "Collecting networkx>=2.2\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e9/93/aa6613aa70d6eb4868e667068b5a11feca9645498fd31b954b6c4bb82fa5/networkx-2.6.3-py3-none-any.whl (1.9 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.9/1.9 MB\u001b[0m \u001b[31m292.4 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting PyWavelets>=1.1.1\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ae/56/4441877073d8a5266dbf7b04c7f3dc66f1149c8efb9323e0ef987a9bb1ce/PyWavelets-1.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.4 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.4/6.4 MB\u001b[0m \u001b[31m339.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.7/dist-packages (from matplotlib->imgaug) (4.33.3)\n",
      "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->imgaug) (0.11.0)\n",
      "Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->imgaug) (3.0.8)\n",
      "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.7/dist-packages (from matplotlib->imgaug) (2.8.2)\n",
      "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->imgaug) (1.4.2)\n",
      "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from kiwisolver>=1.0.1->matplotlib->imgaug) (4.2.0)\n",
      "Installing collected packages: tqdm, tifffile, PyWavelets, networkx, imageio, tensorboardX, scikit-image, imgaug\n",
      "Successfully installed PyWavelets-1.3.0 imageio-2.22.1 imgaug-0.4.0 networkx-2.6.3 scikit-image-0.19.3 tensorboardX-2.5.1 tifffile-2021.11.2 tqdm-4.64.1\n",
      "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
      "\u001b[0m\u001b[33mWARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.\n",
      "You should consider upgrading via the '/usr/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\u001b[33m\n",
      "\u001b[0m"
     ]
    }
   ],
   "source": [
    "!pip install imgaug tensorboardX tqdm -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "raw",
   "id": "40439619-b5bc-4529-aae6-b37343ad615e",
   "metadata": {},
   "source": [
    "!pwd\n",
    "!sh r.sh\n",
    "# !python3 train.py luotu"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "090d0cf2-94d8-466b-9ce8-97e7478378e3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Namespace(batch_size=12, checkpoint_step=1, context_path='resnet18', crop_height=720, crop_width=960, csv='luotu.csv', cuda='0', data='/path/to/CamVid', dataset='CamVid', epoch_start_i=0, learning_rate=0.025, loss='dice', num_classes=2, num_epochs=1000, num_workers=2, optimizer='sgd', pretrained_model_path=None, save_model_path='/project/train/models', test_label_path='/home/data/865/*.jpg', train_label_path='/home/data/865/*.jpg', use_gpu=True, validation_step=1000)\n",
      "train /home/data/865/*.jpg(1080, 1920, 3)\n",
      "imglen:90\n",
      "test /home/data/865/*.jpg(1080, 1920, 3)\n",
      "imglen:10\n",
      "epoch 0, lr 0.025000\n",
      "loss for train : 2.240356\n",
      "start val!\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd0174710>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd0174d70>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01741d0>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e4ad0>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e4b90>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e42f0>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e4a70>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e4e90>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e4b90>\n",
      "(512, 512) <built-in method size of Tensor object at 0x7fcbd01e42f0>\n",
      "mIoU for validation: 0.669 GPU:   9.67G pixel:0.718\n",
      "epoch 1, lr 0.024977\n",
      "loss for train : 2.097080\n",
      "save loss for train : 2.097080\n",
      "epoch 2, lr 0.024955\n",
      "loss for train : 2.029556\n",
      "save loss for train : 2.029556\n",
      "epoch 3, lr 0.024932\n",
      "loss for train : 1.997925\n",
      "save loss for train : 1.997925\n",
      "epoch 4, lr 0.024910\n",
      "loss for train : 1.984117\n",
      "save loss for train : 1.984117\n",
      "epoch 5, lr 0.024887\n",
      "loss for train : 1.939545\n",
      "save loss for train : 1.939545\n",
      "epoch 6, lr 0.024865\n",
      "loss for train : 1.931743\n",
      "save loss for train : 1.931743\n",
      "epoch 7, lr 0.024842\n",
      "loss for train : 1.896794\n",
      "save loss for train : 1.896794\n",
      "epoch 8, lr 0.024820\n",
      "loss for train : 1.862063\n",
      "save loss for train : 1.862063\n",
      "epoch 9, lr 0.024797\n",
      "loss for train : 1.842270\n",
      "save loss for train : 1.842270\n",
      "epoch 10, lr 0.024775\n",
      "loss for train : 1.831117\n",
      "save loss for train : 1.831117\n",
      "epoch 11, lr 0.024752\n",
      "loss for train : 1.804588\n",
      "save loss for train : 1.804588\n",
      "epoch 12, lr 0.024730\n",
      "loss for train : 1.776270\n",
      "save loss for train : 1.776270\n",
      "epoch 13, lr 0.024707\n",
      "loss for train : 1.782309\n",
      "epoch 14, lr 0.024685\n",
      "loss for train : 1.788838\n",
      "epoch 15, lr 0.024662\n",
      "loss for train : 1.762613\n",
      "save loss for train : 1.762613\n",
      "epoch 16, lr 0.024640\n",
      "loss for train : 1.767616\n",
      "epoch 17, lr 0.024617\n",
      "loss for train : 1.726528\n",
      "save loss for train : 1.726528\n",
      "epoch 18, lr 0.024595\n",
      "loss for train : 1.724904\n",
      "save loss for train : 1.724904\n",
      "epoch 19, lr 0.024572\n",
      "loss for train : 1.774726\n",
      "epoch 20, lr 0.024550\n",
      "loss for train : 1.727155\n",
      "epoch 21, lr 0.024527\n",
      "loss for train : 1.735973\n",
      "epoch 22, lr 0.024504\n",
      "loss for train : 1.730124\n",
      "epoch 23, lr 0.024482\n",
      "loss for train : 1.780436\n",
      "epoch 24, lr 0.024459\n",
      "loss for train : 1.722452\n",
      "save loss for train : 1.722452\n",
      "epoch 25, lr 0.024437\n",
      "loss for train : 1.706650\n",
      "save loss for train : 1.706650\n",
      "epoch 26, lr 0.024414\n",
      "loss for train : 1.717651\n",
      "epoch 27, lr 0.024392\n",
      "loss for train : 1.737412\n",
      "epoch 28, lr 0.024369\n",
      "loss for train : 1.678293\n",
      "save loss for train : 1.678293\n",
      "epoch 29, lr 0.024347\n",
      "loss for train : 1.719089\n",
      "epoch 30, lr 0.024324\n",
      "loss for train : 1.707862\n",
      "epoch 31, lr 0.024301\n",
      "loss for train : 1.690086\n",
      "epoch 32, lr 0.024279\n",
      "loss for train : 1.688267\n",
      "epoch 33, lr 0.024256\n",
      "loss for train : 1.685419\n",
      "epoch 34, lr 0.024234\n",
      "loss for train : 1.709005\n",
      "epoch 35, lr 0.024211\n",
      "loss for train : 1.683868\n",
      "epoch 36, lr 0.024189\n",
      "loss for train : 1.680760\n",
      "epoch 37, lr 0.024166\n",
      "loss for train : 1.678052\n",
      "save loss for train : 1.678052\n",
      "epoch 38, lr 0.024143\n",
      "loss for train : 1.702667\n",
      "epoch 39, lr 0.024121\n",
      "loss for train : 1.668993\n",
      "save loss for train : 1.668993\n",
      "epoch 40, lr 0.024098\n",
      "loss for train : 1.658202\n",
      "save loss for train : 1.658202\n",
      "epoch 41, lr 0.024076\n",
      "loss for train : 1.672894\n",
      "epoch 42, lr 0.024053\n",
      "loss for train : 1.665804\n",
      "epoch 43, lr 0.024030\n",
      "loss for train : 1.657808\n",
      "save loss for train : 1.657808\n",
      "epoch 44, lr 0.024008\n",
      "loss for train : 1.662642\n",
      "epoch 45, lr 0.023985\n",
      "loss for train : 1.653544\n",
      "save loss for train : 1.653544\n",
      "epoch 46, lr 0.023963\n",
      "loss for train : 1.680865\n",
      "epoch 47, lr 0.023940\n",
      "loss for train : 1.672870\n",
      "epoch 48, lr 0.023917\n",
      "loss for train : 1.667458\n",
      "epoch 49, lr 0.023895\n",
      "loss for train : 1.654406\n",
      "epoch 50, lr 0.023872\n",
      "loss for train : 1.664290\n",
      "epoch 51, lr 0.023850\n",
      "loss for train : 1.653222\n",
      "save loss for train : 1.653222\n",
      "epoch 52, lr 0.023827\n",
      "loss for train : 1.643504\n",
      "save loss for train : 1.643504\n",
      "epoch 53, lr 0.023804\n",
      "loss for train : 1.659060\n",
      "epoch 54, lr 0.023782\n",
      "loss for train : 1.663757\n",
      "epoch 55, lr 0.023759\n",
      "loss for train : 1.659423\n",
      "epoch 56, lr 0.023736\n",
      "loss for train : 1.630185\n",
      "save loss for train : 1.630185\n",
      "epoch 57, lr 0.023714\n",
      "loss for train : 1.658285\n",
      "epoch 58, lr 0.023691\n",
      "loss for train : 1.653307\n",
      "epoch 59, lr 0.023668\n",
      "loss for train : 1.636951\n",
      "epoch 60, lr 0.023646\n",
      "loss for train : 1.629344\n",
      "save loss for train : 1.629344\n",
      "epoch 61, lr 0.023623\n",
      "loss for train : 1.637689\n",
      "epoch 62, lr 0.023601\n",
      "loss for train : 1.628075\n",
      "save loss for train : 1.628075\n",
      "epoch 63, lr 0.023578\n",
      "loss for train : 1.658100\n",
      "epoch 64, lr 0.023555\n",
      "loss for train : 1.627490\n",
      "save loss for train : 1.627490\n",
      "epoch 65, lr 0.023533\n",
      "loss for train : 1.621283\n",
      "save loss for train : 1.621283\n",
      "epoch 66, lr 0.023510\n",
      "loss for train : 1.634424\n",
      "epoch 67, lr 0.023487\n",
      "loss for train : 1.630427\n",
      "epoch 68, lr 0.023465\n",
      "loss for train : 1.652597\n",
      "epoch 69, lr 0.023442\n",
      "loss for train : 1.645871\n",
      "epoch 70, lr 0.023419\n",
      "loss for train : 1.651085\n",
      "epoch 71, lr 0.023397\n",
      "loss for train : 1.633504\n",
      "epoch 72, lr 0.023374\n",
      "loss for train : 1.642403\n",
      "epoch 73, lr 0.023351\n",
      "loss for train : 1.649416\n",
      "epoch 74, lr 0.023329\n",
      "loss for train : 1.633489\n",
      "epoch 75, lr 0.023306\n",
      "loss for train : 1.627836\n",
      "epoch 76, lr 0.023283\n",
      "loss for train : 1.623772\n",
      "epoch 77, lr 0.023261\n",
      "loss for train : 1.624202\n",
      "epoch 78, lr 0.023238\n",
      "loss for train : 1.622477\n",
      "epoch 79, lr 0.023215\n",
      "loss for train : 1.633459\n",
      "epoch 80, lr 0.023193\n",
      "loss for train : 1.612728\n",
      "save loss for train : 1.612728\n",
      "epoch 81, lr 0.023170\n",
      "loss for train : 1.630415\n",
      "epoch 82, lr 0.023147\n",
      "loss for train : 1.622647\n",
      "epoch 83, lr 0.023125\n",
      "loss for train : 1.623028\n",
      "epoch 84, lr 0.023102\n",
      "loss for train : 1.624662\n",
      "epoch 85, lr 0.023079\n",
      "loss for train : 1.610660\n",
      "save loss for train : 1.610660\n",
      "epoch 86, lr 0.023056\n",
      "loss for train : 1.631197\n",
      "epoch 87, lr 0.023034\n",
      "loss for train : 1.610769\n",
      "epoch 88, lr 0.023011\n",
      "loss for train : 1.624474\n",
      "epoch 89, lr 0.022988\n",
      "loss for train : 1.611568\n",
      "epoch 90, lr 0.022966\n",
      "loss for train : 1.613631\n",
      "epoch 91, lr 0.022943\n",
      "loss for train : 1.597641\n",
      "save loss for train : 1.597641\n",
      "epoch 92, lr 0.022920\n",
      "loss for train : 1.605123\n",
      "epoch 93, lr 0.022897\n",
      "loss for train : 1.608958\n",
      "epoch 94, lr 0.022875\n",
      "loss for train : 1.620255\n",
      "epoch 95, lr 0.022852\n",
      "loss for train : 1.614108\n",
      "epoch 96, lr 0.022829\n",
      "loss for train : 1.607671\n",
      "epoch 97, lr 0.022807\n",
      "loss for train : 1.612649\n",
      "epoch 98, lr 0.022784\n",
      "loss for train : 1.624624\n",
      "epoch 99, lr 0.022761\n",
      "loss for train : 1.609101\n",
      "epoch 100, lr 0.022738\n",
      "loss for train : 1.618057\n",
      "epoch 101, lr 0.022716\n",
      "loss for train : 1.600307\n",
      "epoch 102, lr 0.022693\n",
      "loss for train : 1.603069\n",
      "epoch 103, lr 0.022670\n",
      "loss for train : 1.594345\n",
      "save loss for train : 1.594345\n",
      "epoch 104, lr 0.022647\n",
      "loss for train : 1.601458\n",
      "epoch 105, lr 0.022625\n",
      "loss for train : 1.593642\n",
      "save loss for train : 1.593642\n",
      "epoch 106, lr 0.022602\n",
      "loss for train : 1.611880\n",
      "epoch 107, lr 0.022579\n",
      "loss for train : 1.613671\n",
      "epoch 108, lr 0.022556\n",
      "loss for train : 1.596882\n",
      "epoch 109, lr 0.022534\n",
      "loss for train : 1.603259\n",
      "epoch 110, lr 0.022511\n",
      "loss for train : 1.604239\n",
      "epoch 111, lr 0.022488\n",
      "loss for train : 1.617048\n",
      "epoch 112, lr 0.022465\n",
      "loss for train : 1.623623\n",
      "epoch 113, lr 0.022443\n",
      "loss for train : 1.593074\n",
      "save loss for train : 1.593074\n",
      "epoch 114, lr 0.022420\n",
      "loss for train : 1.612285\n",
      "epoch 115, lr 0.022397\n",
      "loss for train : 1.604756\n",
      "epoch 116, lr 0.022374\n",
      "loss for train : 1.599197\n",
      "epoch 117, lr 0.022351\n",
      "loss for train : 1.608680\n",
      "epoch 118, lr 0.022329\n",
      "loss for train : 1.595690\n",
      "epoch 119, lr 0.022306\n",
      "loss for train : 1.603857\n",
      "epoch 120, lr 0.022283\n",
      "loss for train : 1.610954\n",
      "epoch 121, lr 0.022260\n",
      "loss for train : 1.595336\n",
      "epoch 122, lr 0.022237\n",
      "loss for train : 1.597301\n",
      "epoch 123, lr 0.022215\n",
      "loss for train : 1.587987\n",
      "save loss for train : 1.587987\n",
      "epoch 124, lr 0.022192\n",
      "loss for train : 1.591309\n",
      "epoch 125, lr 0.022169\n",
      "loss for train : 1.604760\n",
      "epoch 126, lr 0.022146\n",
      "loss for train : 1.591526\n",
      "epoch 127, lr 0.022123\n",
      "loss for train : 1.594355\n",
      "epoch 128, lr 0.022101\n",
      "loss for train : 1.601584\n",
      "epoch 129, lr 0.022078\n",
      "loss for train : 1.601178\n",
      "epoch 130, lr 0.022055\n",
      "loss for train : 1.597282\n",
      "epoch 131, lr 0.022032\n",
      "loss for train : 1.597963\n",
      "epoch 132, lr 0.022009\n",
      "loss for train : 1.587413\n",
      "save loss for train : 1.587413\n",
      "epoch 133, lr 0.021987\n",
      "loss for train : 1.594789\n",
      "epoch 134, lr 0.021964\n",
      "loss for train : 1.608323\n",
      "epoch 135, lr 0.021941\n",
      "loss for train : 1.596714\n",
      "epoch 136, lr 0.021918\n",
      "loss for train : 1.601439\n",
      "epoch 137, lr 0.021895\n",
      "loss for train : 1.603284\n",
      "epoch 138, lr 0.021872\n",
      "loss for train : 1.603599\n",
      "epoch 139, lr 0.021850\n",
      "loss for train : 1.597154\n",
      "epoch 140, lr 0.021827\n",
      "loss for train : 1.604941\n",
      "epoch 141, lr 0.021804\n",
      "loss for train : 1.609147\n",
      "epoch 142, lr 0.021781\n",
      "loss for train : 1.605698\n",
      "epoch 143, lr 0.021758\n",
      "loss for train : 1.595563\n",
      "epoch 144, lr 0.021735\n",
      "loss for train : 1.596730\n",
      "epoch 145, lr 0.021712\n",
      "loss for train : 1.605098\n",
      "epoch 146, lr 0.021690\n",
      "loss for train : 1.590032\n",
      "epoch 147, lr 0.021667\n",
      "loss for train : 1.598489\n",
      "epoch 148, lr 0.021644\n",
      "loss for train : 1.612086\n",
      "epoch 149, lr 0.021621\n",
      "loss for train : 1.592308\n",
      "epoch 150, lr 0.021598\n",
      "loss for train : 1.582699\n",
      "save loss for train : 1.582699\n",
      "epoch 151, lr 0.021575\n",
      "loss for train : 1.597384\n",
      "epoch 152, lr 0.021552\n",
      "loss for train : 1.599484\n",
      "epoch 153, lr 0.021530\n",
      "loss for train : 1.584613\n",
      "epoch 154, lr 0.021507\n",
      "loss for train : 1.587562\n",
      "epoch 155, lr 0.021484\n",
      "loss for train : 1.597767\n",
      "epoch 156, lr 0.021461\n",
      "loss for train : 1.582922\n",
      "epoch 157, lr 0.021438\n",
      "loss for train : 1.595920\n",
      "epoch 158, lr 0.021415\n",
      "loss for train : 1.590611\n",
      "epoch 159, lr 0.021392\n",
      "loss for train : 1.581092\n",
      "save loss for train : 1.581092\n",
      "epoch 160, lr 0.021369\n",
      "loss for train : 1.586938\n",
      "epoch 161, lr 0.021346\n",
      "loss for train : 1.599059\n",
      "epoch 162, lr 0.021324\n",
      "loss for train : 1.590073\n",
      "epoch 163, lr 0.021301\n",
      "loss for train : 1.587129\n",
      "epoch 164, lr 0.021278\n",
      "loss for train : 1.597647\n",
      "epoch 165, lr 0.021255\n",
      "loss for train : 1.585875\n",
      "epoch 166, lr 0.021232\n",
      "loss for train : 1.580597\n",
      "save loss for train : 1.580597\n",
      "epoch 167, lr 0.021209\n",
      "loss for train : 1.580891\n",
      "epoch 168, lr 0.021186\n",
      "loss for train : 1.573741\n",
      "save loss for train : 1.573741\n",
      "epoch 169, lr 0.021163\n",
      "loss for train : 1.608244\n",
      "epoch 170, lr 0.021140\n"
     ]
    }
   ],
   "source": [
    "!sh /project/train/bisenet/r.sh"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "23817dd9-bbf6-44ce-8ef7-91e7d2166751",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/project/train/bisenet\n"
     ]
    }
   ],
   "source": [
    "#拷贝到测试目录\n",
    "%cd /project/train/bisenet\n",
    "!rm -r /project/ev_sdk/src/*\n",
    "!cp -r ./* /project/ev_sdk/src/\n",
    "!ln /project/train/bisenet/ji_mask.py /project/ev_sdk/src/ji.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6d83546f-26f1-473c-a2ba-a6af168ab66a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/project/train/bisenet\n"
     ]
    }
   ],
   "source": [
    "#拷贝到训练目录\n",
    "%cd /project/train/bisenet\n",
    "!rm -r /project/train/src_repo/*\n",
    "!mkdir -p  /project/train/src_repo/\n",
    "!cp -r ./* /project/train/src_repo/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c8337940-d606-468d-a701-8b76b1ec9f47",
   "metadata": {},
   "outputs": [],
   "source": [
    "!ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c6f4d282-a854-4004-9523-03ab41b0345d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
